#ifndef __CAMERA_3D_G_H__
#define __CAMERA_3D_G_H__

#include "Define.h"
#include "Math.h"
#include "..\Log.h"
	//Over 180*
#define ULTRA_LENSES		225.0f
	//From over 60* to 180*
#define	WIDE_LENSES			75.0f
	//From over 40* to 60*
#define	NORMAL_LENSES		45.0f
	//From over 10* to 40*
#define	TELE_LENSES			25.0f
	//From 0* to 8*
#define SUPER_TELE_LENSES	5.0f

#define	PI				3.14f

	//Field of view
#define FOV				NORMAL_LENSES * PI / 180.0f
#define	ASPECTRATIO		1024.0f/768.0f
#define	NEAREST			1.0f
#define	FATHEST			100000.0f

/**
Camera 3D base
Abstact methods:
->void MoveForword(FWfloat)
->void MoveBackwork(FWfloat)
->void MoveLeft(FWfloat)
->void MoveRight(FWfloat)

->void RotateUp(FWfloat)
->void RotateDown(FWfloat)
->void RotateLeft(FWfloat)
->void RotateRight(FWfloat)

->Matrix LocalWorld()
->Matrix View()
*/
class Camera3D
{
protected:
	Matrix m_world;			//Camera local world matrix
public:
	Matrix View;			//Camera view matrix
protected:
	//Compute local world matrix
	virtual Matrix CalculateWorld() = 0;
	//Compute view matrix
	virtual Matrix CalculateView() = 0;
public:
	virtual void MoveLeft(FWfloat) = 0;
	virtual void MoveRight(FWfloat) = 0;
public:
	Vector3 Position;		//Current camera's position
	Vector3 RotateAngle;	//Current camera's rotate angle include rotate by x axis, y axis, z axis
	Matrix Projection;		//Perspective matrix
protected:
	Camera3D();
public:
	virtual ~Camera3D();

	virtual void MoveForward(FWfloat) = 0;
	virtual void MoveBackward(FWfloat) = 0;

	virtual void RotateUp(FWfloat) = 0;
	virtual void RotateDown(FWfloat) = 0;
	virtual void RotateLeft(FWfloat) = 0;
	virtual void RotateRight(FWfloat) = 0;

	virtual void Update(FWfloat);
};

#endif